package com.bdqn.boot.yuanshen.mapper;

import com.bdqn.boot.yuanshen.bean.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author fly
 * @version 1.0
 * @className UserMapper
 * @description TODO
 * @date 2025/3/12 11:11
 */
@Mapper
public interface UsersMapper {
    /**
     * 添加方法
     * @param users
     * @return
     */
    int addUsers(Users users);


    /**
     * 删除方法
     * @param id
     * @return
     */
    int deleteUser(@Param("id") Integer id);

    /**
     * 修改方法
     * @param users
     * @return
     */
    int updateUser(Users users);

    List<Users> getUsers();

    Users getUserById(@Param("id") Integer id);

    List<Users> getUserByUserNameAndPage(@Param("username") String username);

    Users login(@Param("username") String username);
}
